package com.twu.biblioteca.menu;

public enum MenuOption {

    LIST_BOOK("1", "List All Books"),
    CHECKOUT_BOOK("2", "Checkout Book"),
    RETURN_BOOK("3", "Return Book"),
    QUIT("Quit", "Quit Application");

    private final String key;
    private final String text;

    private MenuOption(String key, String text) {
        this.key = key;
        this.text = text;
    }

    public String getKey() {
        return key;
    }

    public static String getOptionListAsString() {
        String output = "";

        for (MenuOption option : values())
            output += option.getKey() + ": " + option.getText() + "\n";

        return output;
    }

    private String getText() {
        return text;
    }
}
